<template>
    <div class="default">
        <my-header ref='childs'/>
        <side-menu ref='child'/>
        <my-footer/>
        <div class="div">
             <span v-show="type" class="my" @click="tiaoZhuan">
             我的客户
        </span>
        <el-tabs class="page-tabs" v-model="pageTabsValue" type="border-card" closable @tab-remove="removeTab"  @tab-click="handleNuxt">

            <el-tab-pane
                    v-for="(item, index) in pageTabsList"
                    :key="item.fullPath"
                    :label="item.name"
                    :name="item.fullPath">
                <!--<nuxt />-->
            </el-tab-pane>
        </el-tabs>
        </div>
       
        <nuxt/>
        <my-loading/>
    </div>
</template>

<script>
    import Vue from 'vue'
    import { mapGetters } from 'vuex';
    import MyHeader from '~components/header.vue'
    import SideMenu from '~components/sideMenu.vue'
    import MyFooter from '~components/footer.vue'
    import MyLoading from '~components/loading.vue'
    import {
        Notification,Tabs,TabPane
    } from 'element-ui'

    Vue.use(Tabs);
    Vue.use(TabPane);

    export default {
        middleware: 'auth',
        components: {
            MyHeader,
            SideMenu,
            MyFooter,
            MyLoading
        },
        data () {
            return {
                missedCallOption: {},
                pageTabsValue: null,
                type: true,
            }
        },
        computed: {
            ...mapGetters({
                pageTabsList: 'getPageTabsList',
            })
        },
        methods: {
            getTypeChild() {
                if (this.$refs.childs.activeIndex==1) {
                    this.type = true
                    document.getElementsByClassName("el-tabs__header")[0].style.padding='0 0 0 95px'
                }else {
                    this.type = false
                    document.getElementsByClassName("el-tabs__header")[0].style.padding='0'
                }
                this.$refs.child.getType()
            },
            tiaoZhuan() {
                // console.log('aa');
            // console.log(this)
                this.$router.push({
                        path: '/customer',
                    });
            },
            handleNuxt(arg) {
                // console.log(arg,this.pageTabsValue)
                //this.pageTabsValue ==>/cousteomer/...
                if(arg.label == this.pageTabsValue) return true;
                this.$router.push({path: arg.name})
            },
            removeTab(targetName) {
                //==> /coustomer/sea
                let tabs = this.pageTabsList;
                //   tabs是一个数组
                let activeName = this.pageTabsValue;
                if (activeName === targetName) {
                    tabs.forEach((tab, index) => {
                        if ((tab.fullPath) === targetName) {
                            let nextTab = tabs[index + 1] || tabs[index - 1];
                            if (nextTab) {
                                activeName = nextTab.fullPath;
                            }
                        }
                    });
                }
                this.$router.push({path: activeName});
                this.pageTabsValue = activeName;
                this.$store.commit('PAGETABSLIST',{data:tabs.filter(tab => (tab.fullPath) !== targetName)})
                let url=targetName.substring(1);
                switch (url){
                	//运营模块
		            case 'warning/collectList?index=0': 
			            this.$store.commit('LOW_TODAY_DATA',{data:{
			            	currentPageLow :1,
					    	totalCountLow : 0,
					      	pageSizeLow: 50,
						    brandSelectId0:'',
						    brandName0:'',
						    SkuSelectId0:'',
						    keyword0:'',
						    usIds0:'',
						    checkTypes0:[],
						    categoryName0:'',
						    Operater0:''
			            }});
			            this.$store.commit('ACTIVE_NAME', { activeName: ''});
			            this.$store.commit('ACTIVE_NAME_FAKE', { activeName00:''});
			            this.$store.commit('FAKE_TODAY_DATA',{data:{
			            	currentPageFake :1,
						    totalCountFake : 0,
						    pageSizeFake: 50,
						    brandSelectId1:'',
						    brandName1:'',
						    SkuSelectId1:'',
						    keyword1:'',
						    usIds1:'',
						    checkTypes1:[],
						    categoryName1:'',
						    Operater1:''
			            }});
			            this.$store.commit('ACTIVE_NAME_RPT', { activeName2:''})
			            this.$store.commit('RPT_TODAY_DATA',{data:{
			            	currentPageRpt :1,
						    totalCountRpt : 0,
						    pageSizeRpt: 50,
						    brandSelectId2:'',
						    brandName2:'',
						    usIds2:'',
						    checkTypes2:[],
						    categoryName2:'',
						    Operater2:''
			            }});
			            break;
		            case 'warning/collectList?index=00': 
		            	this.$store.commit('ACTIVE_NAME_H', { activeName1: ''});
		            	this.$store.commit('LOW_HISTORY_DATA',{data:{
		            		currentPageLow :1,
					    	totalCountLow : 0,
					      	pageSizeLow: 50,
						    brandSelectId0:'',
						    brandName0:'',
						    SkuSelectId0:'',
						    keyword0:'',
						    usIds0:'',
						    checkTypes0:[],
						    categoryName0:'',
						    Operater0:''
		            	}});
		            	this.$store.commit('ACTIVE_NAME_FAKE_H', { activeName11:''});
			            this.$store.commit('FAKE_HISTORY_DATA',{data:{
			            	currentPageFake :1,
						    totalCountFake : 0,
						    pageSizeFake: 50,
						    brandSelectId1:'',
						    brandName1:'',
						    SkuSelectId1:'',
						    keyword1:'',
						    usIds1:'',
						    checkTypes1:[],
						    categoryName1:'',
						    Operater1:''
			            }});
			            this.$store.commit('ACTIVE_NAME_RPT_H', { activeName22: ''})
			            this.$store.commit('RPT_HISTORY_DATA',{data:{
			            	currentPageRpt :1,
						    totalCountRpt : 0,
						    pageSizeRpt: 50,
						    brandSelectId2:'',
						    brandName2:'',
						    usIds2:'',
						    checkTypes2:[],
						    categoryName2:'',
						    Operater2:''
			            }});
		            	break;
			        case 'warning/collectList?index=1':
			        	this.$store.commit('LOW_TODAY_DATA',{data:{
			            	currentPageLow :1,
					    	totalCountLow : 0,
					      	pageSizeLow: 50,
						    brandSelectId0:'',
						    brandName0:'',
						    SkuSelectId0:'',
						    keyword0:'',
						    usIds0:'',
						    checkTypes0:[],
						    categoryName0:'',
						    Operater0:''
			            }});
			            this.$store.commit('ACTIVE_NAME', { activeName: ''});
			            this.$store.commit('ACTIVE_NAME_FAKE', { activeName00:''});
			            this.$store.commit('FAKE_TODAY_DATA',{data:{
			            	currentPageFake :1,
						    totalCountFake : 0,
						    pageSizeFake: 50,
						    brandSelectId1:'',
						    brandName1:'',
						    SkuSelectId1:'',
						    keyword1:'',
						    usIds1:'',
						    checkTypes1:[],
						    categoryName1:'',
						    Operater1:''
			            }});
			            this.$store.commit('ACTIVE_NAME_RPT', { activeName2:''})
			            this.$store.commit('RPT_TODAY_DATA',{data:{
			            	currentPageRpt :1,
						    totalCountRpt : 0,
						    pageSizeRpt: 50,
						    brandSelectId2:'',
						    brandName2:'',
						    usIds2:'',
						    checkTypes2:[],
						    categoryName2:'',
						    Operater2:''
			            }});
			            break;
			        case 'warning/collectList?index=11':
			            this.$store.commit('ACTIVE_NAME_H', { activeName1: ''});
		            	this.$store.commit('LOW_HISTORY_DATA',{data:{
		            		currentPageLow :1,
					    	totalCountLow : 0,
					      	pageSizeLow: 50,
						    brandSelectId0:'',
						    brandName0:'',
						    SkuSelectId0:'',
						    keyword0:'',
						    usIds0:'',
						    checkTypes0:[],
						    categoryName0:'',
						    Operater0:''
		            	}});
		            	this.$store.commit('ACTIVE_NAME_FAKE_H', { activeName11:''});
			            this.$store.commit('FAKE_HISTORY_DATA',{data:{
			            	currentPageFake :1,
						    totalCountFake : 0,
						    pageSizeFake: 50,
						    brandSelectId1:'',
						    brandName1:'',
						    SkuSelectId1:'',
						    keyword1:'',
						    usIds1:'',
						    checkTypes1:[],
						    categoryName1:'',
						    Operater1:''
			            }});
			            this.$store.commit('ACTIVE_NAME_RPT_H', { activeName22: ''})
			            this.$store.commit('RPT_HISTORY_DATA',{data:{
			            	currentPageRpt :1,
						    totalCountRpt : 0,
						    pageSizeRpt: 50,
						    brandSelectId2:'',
						    brandName2:'',
						    usIds2:'',
						    checkTypes2:[],
						    categoryName2:'',
						    Operater2:''
			            }});
			            break;
					case 'warning/collectList?index=2':
						this.$store.commit('LOW_TODAY_DATA',{data:{
			            	currentPageLow :1,
					    	totalCountLow : 0,
					      	pageSizeLow: 50,
						    brandSelectId0:'',
						    brandName0:'',
						    SkuSelectId0:'',
						    keyword0:'',
						    usIds0:'',
						    checkTypes0:[],
						    categoryName0:'',
						    Operater0:''
			            }});
			            this.$store.commit('ACTIVE_NAME', { activeName: ''});
			            this.$store.commit('ACTIVE_NAME_FAKE', { activeName00:''});
			            this.$store.commit('FAKE_TODAY_DATA',{data:{
			            	currentPageFake :1,
						    totalCountFake : 0,
						    pageSizeFake: 50,
						    brandSelectId1:'',
						    brandName1:'',
						    SkuSelectId1:'',
						    keyword1:'',
						    usIds1:'',
						    checkTypes1:[],
						    categoryName1:'',
						    Operater1:''
			            }});
			            this.$store.commit('ACTIVE_NAME_RPT', { activeName2:''})
			            this.$store.commit('RPT_TODAY_DATA',{data:{
			            	currentPageRpt :1,
						    totalCountRpt : 0,
						    pageSizeRpt: 50,
						    brandSelectId2:'',
						    brandName2:'',
						    usIds2:'',
						    checkTypes2:[],
						    categoryName2:'',
						    Operater2:''
			            }});
			            break;
			        case 'warning/collectList?index=22':
			        	this.$store.commit('ACTIVE_NAME_H', { activeName1: ''});
		            	this.$store.commit('LOW_HISTORY_DATA',{data:{
		            		currentPageLow :1,
					    	totalCountLow : 0,
					      	pageSizeLow: 50,
						    brandSelectId0:'',
						    brandName0:'',
						    SkuSelectId0:'',
						    keyword0:'',
						    usIds0:'',
						    checkTypes0:[],
						    categoryName0:'',
						    Operater0:''
		            	}});
		            	this.$store.commit('ACTIVE_NAME_FAKE_H', { activeName11:''});
			            this.$store.commit('FAKE_HISTORY_DATA',{data:{
			            	currentPageFake :1,
						    totalCountFake : 0,
						    pageSizeFake: 50,
						    brandSelectId1:'',
						    brandName1:'',
						    SkuSelectId1:'',
						    keyword1:'',
						    usIds1:'',
						    checkTypes1:[],
						    categoryName1:'',
						    Operater1:''
			            }});
			            this.$store.commit('ACTIVE_NAME_RPT_H', { activeName22: ''})
			            this.$store.commit('RPT_HISTORY_DATA',{data:{
			            	currentPageRpt :1,
						    totalCountRpt : 0,
						    pageSizeRpt: 50,
						    brandSelectId2:'',
						    brandName2:'',
						    usIds2:'',
						    checkTypes2:[],
						    categoryName2:'',
						    Operater2:''
			            }});
			            break;
			        case 'warning/detailList?index=0':
			            this.$store.commit('ACTIVE', { active: ''});
			            this.$store.commit('LOW_TODAY_DATA_DETAIL',{data:{
			            	currentPageLowDetail :1,
						    totalCountLowDetail : 0,
						    pageSizeLowDetail: 50,
						    brandSelectId3:'',
						    brandName3:'',
						    SkuSelectId3:'',
						    keyword3:'',
						    title:'',
						    checkTypes3:[],
						    categoryName3:''
			            }});
			            this.$store.commit('ACTIVE_FAKE', { active00:''})
			            this.$store.commit('FAKE_TODAY_DATA_DETAIL',{data:{
			            	currentPageFakeDetail :1,
						    totalCountFakeDetail : 0,
						    pageSizeFakeDetail: 50,
						    brandSelectId4:'',
						    brandName4:'',
						    SkuSelectId4:'',
						    keyword4:'',
						    title1:'',
						    checkTypes4:[],
						    categoryName4:''
			            }});
						this.$store.commit('ACTIVE_RPT', { active2:''})
			            this.$store.commit('RPT_TODAY_DATA_DETAIL',{data:{
			            	currentPageRptDetail :1,
						    totalCountRptDetail : 0,
						    pageSizeRptDetail: 50,
						    brandSelectId5:'',
						    brandName5:'',
						    RptName:'',
						    checkTypes5:[],
						    categoryName5:''
			            }});
			        	break;
			        case 'warning/detailList?index=00':
			        	this.$store.commit('ACTIVE_H', { active1: ''});
			            this.$store.commit('LOW_HISTORY_DATA_DETAIL',{data:{
			            	currentPageLowDetail :1,
						    totalCountLowDetail : 0,
						    pageSizeLowDetail: 50,
						    brandSelectId3:'',
						    brandName3:'',
						    SkuSelectId3:'',
						    keyword3:'',
						    title:'',
						    checkTypes3:[],
						    categoryName3:''
			            }});
			            this.$store.commit('ACTIVE_FAKE_H', { active11: ''})
			            this.$store.commit('FAKE_HISTORY_DATA_DETAIL',{data:{
			            	currentPageFakeDetail :1,
						    totalCountFakeDetail : 0,
						    pageSizeFakeDetail: 50,
						    brandSelectId4:'',
						    brandName4:'',
						    SkuSelectId4:'',
						    keyword4:'',
						    title1:'',
						    checkTypes4:[],
						    categoryName4:''
			            }});
			            this.$store.commit('ACTIVE_RPT_H', { active22:''})
			            this.$store.commit('RPT_HISTORY_DATA_DETAIL',{data:{
							currentPageRptDetail :1,
						    totalCountRptDetail : 0,
						    pageSizeRptDetail: 50,
						    brandSelectId5:'',
						    brandName5:'',
						    RptName:'',
						    checkTypes5:[],
						    categoryName5:''
			            }});
			        	break;
			        case 'warning/detailList?index=1':
			        	this.$store.commit('ACTIVE', { active: ''});
			            this.$store.commit('LOW_TODAY_DATA_DETAIL',{data:{
			            	currentPageLowDetail :1,
						    totalCountLowDetail : 0,
						    pageSizeLowDetail: 50,
						    brandSelectId3:'',
						    brandName3:'',
						    SkuSelectId3:'',
						    keyword3:'',
						    title:'',
						    checkTypes3:[],
						    categoryName3:''
			            }});
			            this.$store.commit('ACTIVE_FAKE', { active00:''})
			            this.$store.commit('FAKE_TODAY_DATA_DETAIL',{data:{
			            	currentPageFakeDetail :1,
						    totalCountFakeDetail : 0,
						    pageSizeFakeDetail: 50,
						    brandSelectId4:'',
						    brandName4:'',
						    SkuSelectId4:'',
						    keyword4:'',
						    title1:'',
						    checkTypes4:[],
						    categoryName4:''
			            }});
						this.$store.commit('ACTIVE_RPT', { active2:''})
			            this.$store.commit('RPT_TODAY_DATA_DETAIL',{data:{
			            	currentPageRptDetail :1,
						    totalCountRptDetail : 0,
						    pageSizeRptDetail: 50,
						    brandSelectId5:'',
						    brandName5:'',
						    RptName:'',
						    checkTypes5:[],
						    categoryName5:''
			            }});
			        	break;
			        case 'warning/detailList?index=11':
			        	this.$store.commit('ACTIVE_H', { active1: ''});
			            this.$store.commit('LOW_HISTORY_DATA_DETAIL',{data:{
			            	currentPageLowDetail :1,
						    totalCountLowDetail : 0,
						    pageSizeLowDetail: 50,
						    brandSelectId3:'',
						    brandName3:'',
						    SkuSelectId3:'',
						    keyword3:'',
						    title:'',
						    checkTypes3:[],
						    categoryName3:''
			            }});
			            this.$store.commit('ACTIVE_FAKE_H', { active11: ''})
			            this.$store.commit('FAKE_HISTORY_DATA_DETAIL',{data:{
			            	currentPageFakeDetail :1,
						    totalCountFakeDetail : 0,
						    pageSizeFakeDetail: 50,
						    brandSelectId4:'',
						    brandName4:'',
						    SkuSelectId4:'',
						    keyword4:'',
						    title1:'',
						    checkTypes4:[],
						    categoryName4:''
			            }});
			            this.$store.commit('ACTIVE_RPT_H', { active22:''})
			            this.$store.commit('RPT_HISTORY_DATA_DETAIL',{data:{
							currentPageRptDetail :1,
						    totalCountRptDetail : 0,
						    pageSizeRptDetail: 50,
						    brandSelectId5:'',
						    brandName5:'',
						    RptName:'',
						    checkTypes5:[],
						    categoryName5:''
			            }});
			        	break;
			        case 'warning/detailList?index=2':
			        	this.$store.commit('ACTIVE', { active: ''});
			            this.$store.commit('LOW_TODAY_DATA_DETAIL',{data:{
			            	currentPageLowDetail :1,
						    totalCountLowDetail : 0,
						    pageSizeLowDetail: 50,
						    brandSelectId3:'',
						    brandName3:'',
						    SkuSelectId3:'',
						    keyword3:'',
						    title:'',
						    checkTypes3:[],
						    categoryName3:''
			            }});
			            this.$store.commit('ACTIVE_FAKE', { active00:''})
			            this.$store.commit('FAKE_TODAY_DATA_DETAIL',{data:{
			            	currentPageFakeDetail :1,
						    totalCountFakeDetail : 0,
						    pageSizeFakeDetail: 50,
						    brandSelectId4:'',
						    brandName4:'',
						    SkuSelectId4:'',
						    keyword4:'',
						    title1:'',
						    checkTypes4:[],
						    categoryName4:''
			            }});
						this.$store.commit('ACTIVE_RPT', { active2:''})
			            this.$store.commit('RPT_TODAY_DATA_DETAIL',{data:{
			            	currentPageRptDetail :1,
						    totalCountRptDetail : 0,
						    pageSizeRptDetail: 50,
						    brandSelectId5:'',
						    brandName5:'',
						    RptName:'',
						    checkTypes5:[],
						    categoryName5:''
			            }});
			        	break;
			        case 'warning/detailList?index=22':
			        	this.$store.commit('ACTIVE_H', { active1: ''});
			            this.$store.commit('LOW_HISTORY_DATA_DETAIL',{data:{
			            	currentPageLowDetail :1,
						    totalCountLowDetail : 0,
						    pageSizeLowDetail: 50,
						    brandSelectId3:'',
						    brandName3:'',
						    SkuSelectId3:'',
						    keyword3:'',
						    title:'',
						    checkTypes3:[],
						    categoryName3:''
			            }});
			            this.$store.commit('ACTIVE_FAKE_H', { active11: ''})
			            this.$store.commit('FAKE_HISTORY_DATA_DETAIL',{data:{
			            	currentPageFakeDetail :1,
						    totalCountFakeDetail : 0,
						    pageSizeFakeDetail: 50,
						    brandSelectId4:'',
						    brandName4:'',
						    SkuSelectId4:'',
						    keyword4:'',
						    title1:'',
						    checkTypes4:[],
						    categoryName4:''
			            }});
			            this.$store.commit('ACTIVE_RPT_H', { active22:''})
			            this.$store.commit('RPT_HISTORY_DATA_DETAIL',{data:{
							currentPageRptDetail :1,
						    totalCountRptDetail : 0,
						    pageSizeRptDetail: 50,
						    brandSelectId5:'',
						    brandName5:'',
						    RptName:'',
						    checkTypes5:[],
						    categoryName5:''
			            }});
			        	break;
			        case 'seller':
			            this.$store.commit('SELLER_SEARCH_VALUE',{value:''});
			            this.$store.commit('SELLER_SEARCH_KEYWORD',{keyword:''});
			            this.$store.commit('SELLER_SEARCH_ID',{id:''});
			            this.$store.commit('SELLER_CURRENTPAGE',{currentPage:1});
			            this.$store.commit('SELLER_PAGESIZE',{pageSize:50});
			            break;
			        case 'keyWord':
			            this.$store.commit('KEYWORD_SEARCH_VALUE',{value:''})
			            this.$store.commit('KEYWORD_SEARCH_KEYWORD',{keyword:''})
			            this.$store.commit('KEYWORD_SEARCH_ID',{id:''})
			            this.$store.commit('KEYWORD_CURRENTPAGE',{currentPage:1});
			            this.$store.commit('KEYWORD_PAGESIZE',{pageSize:50});
			            break; 
			        case 'setting/Rights':
			            this.$store.commit('RIGHTS_SEARCH_BRANDNAME',{brandName:''})
		            	this.$store.commit('RIGHTS_SEARCH_SEARCHID',{searchId:''})
				        this.$store.commit('RIGHTS_SEARCH_LASTSTATUS',{lastStatus:''})
				        this.$store.commit('RIGHTS_SEARCH_COOKIE',{cookie:''})
				        this.$store.commit('RIGHTS_SEARCH_GMTCREATEBEGIN',{gmtCreateBegin:''})
				        this.$store.commit('RIGHTS_SEARCH_GMTCREATEEND',{gmtCreateEnd:''})
				        this.$store.commit('RIGHTS_SEARCH_LASTTIMEBEGIN',{lastTimeBegin:''})
				        this.$store.commit('RIGHTS_SEARCH_LASTTIMEEND',{brandName:''})
			            this.$store.commit('RIGHTS_CURRENTPAGE',{currentPage:1});
			            this.$store.commit('RIGHTS_PAGESIZE',{pageSize:50});
			            break; 
			        case 'calender/index_calender':
			            this.$store.commit('CALENDER_FILTER',{data:null});
		                this.$store.commit('CALENDER_CATEGORY',{data:''});
		                this.$store.commit('CALENDER_SELLER',{data:''});
			            break;
			            //销售模块
			        case 'power/tel-management':
			            this.$store.commit('TEL_SYSTEM_FILTER',{data:null})
                    	break;  
                    case 'calender':
			            this.$store.commit('CALENDER_FILTER',{data:null});
		                this.$store.commit('CALENDER_CATEGORY',{data:''});
		                this.$store.commit('CALENDER_SELLER',{data:''});
                    	break; 
                    case 'customer':
			            this.$store.commit('MY_CUSTOMER_FILTER',{data:null});
                		this.$store.commit('MY_CUSTOMER_CATEGORY',{data:''});
                    	break;
                    case 'customer/add':
                    	this.$store.commit('INIT_ADD_CUSTOMER_FORM',{data:null});
			           //this.$store.commit('ADD_CUSTOMER_FILTER',{data:null});
                    	break; 
                    case 'customer/seas':
			            this.$store.commit('SEAS_CUSTOMER_FILTER',{data:null});
          				this.$store.commit('SEAS_CUSTOMER_CATEGORY',{data:''});
                    	break; 
                    case 'customer/new-record':
			            this.$store.commit('NEW_RECORD_FILTER',{data:null});
                        this.$store.commit('NEW_RECORD_CATEGORY',{data:''});
                    	break;
                    case 'customer/brandlist':
                    	this.$store.commit('MY_CUS_BRABDLIST',{data:null});
                    	break; 
                    case 'customer/missed-call':
			            this.$store.commit('MISSED_CALL_FILTER',{data:null});
		                this.$store.commit('MISSED_CALL_USER',{data:null});
		                this.$store.commit('MISSED_CALL_CATEGORY',{data:null});
                    	break; 
                    case 'report':
			            this.$store.commit('REPORT_ADD_FILTER',{data:null});
                        this.$store.commit('REPORT_ADD_CATEGORY',{data:null});
                        this.$store.commit('REPORT_ADD_DEPT',{data:null});
                    	break; 
                    case 'report/owner':
                        this.$store.commit('REPORT_OWNER_FILTER',{data:null});
                        this.$store.commit('REPORT_OWNER_CATEGORY',{data:null});
                        this.$store.commit('REPORT_OWNER_DEPT',{data:null});
                    	break; 
                    case 'report/follow':
                        this.$store.commit('REPORT_FOLLOW_FILTER',{data:null});
                        this.$store.commit('REPORT_FOLLOW_CATEGORY',{data:null});
                        this.$store.commit('REPORT_FOLLOW_DEPT',{data:null});
                        this.$store.commit('REPORT_FOLLOW_CONTACT',{data:null});
                    	break; 
                    case 'report/destination':
                        this.$store.commit('REPORT_DESTINATION_FILTER',{data:null});
                        this.$store.commit('REPORT_DESTINATION_CATEGORY',{data:null});
                        this.$store.commit('REPORT_DESTINATION_DEPT',{data:null});
                    	break; 
                    case 'report/online':
                        this.$store.commit('REPORT_ONLINE_FILTER',{data:null});
                        this.$store.commit('REPORT_ONLINE_DEPT',{data:null});
                    	break; 
                    case 'power/post-manage':
                        this.$store.commit('POST_SETTING_FILTER',{data: null});
                    	break;
                    case 'power/user-control':
                        this.$store.commit('PERSON_SETTING_FILTER',{data: null});
                    	break;
                    case 'power/setting':
                        this.$store.commit('POWER_SETTING_FILTER',{data:null});
                    	break;
                    case 'brandadmin':
                        this.$store.commit('MY_BRAND_FILTER',{data:null});
                    	break;
                    case 'inform':
			            this.$store.commit('INFO_STARTTIME',{startTime:''});
				        this.$store.commit('INFO_ENDTIME',{endTime:''});
				        this.$store.commit('INFO_VERSION',{version:''});
				        this.$store.commit('INFO_STATUS',{Status:''});
				        this.$store.commit('INFO_PAGESIZE',{pageSize:50});
				        this.$store.commit('INFO_CURRENTPAGE',{currentPage:1});
			            break; 
		        }
            }
        },
        watch: {
            $route:function () {
                let arr = this.pageTabsList;
                let path = this.$route.fullPath;
//              if(path.indexOf('index=')>0){
//              	let indexLength=path.split('index=')[1].length
//              }
                let name = null;
                let i = null;
                let arrun = [];
                for(i=arr.length-1;i>=0;i--){
                    if(arr[i].fullPath == path){
                        name = arr[i].name;
                        arr.splice(i,1);
                        break
                    }
//                  if(arr[i].name=="今日预警汇总列表" && path.indexOf('index=')>0 && indexLength==1){
//                  	if(i==arr.indexOf('今日预警汇总列表')){
//                  		break;
//                  	}
//                  	arr.splice(i, 1)
//                  }
                   else if (arr[i].name == "我的客户"){
                       arr.splice(i,1)
                   } 
                }

                i >= 0 ? true : name = 'CRM';
                arr.push({name: name,fullPath: this.$route.fullPath});

                var lent = arr.length;
                
                this.$store.commit('PAGETABSLIST',{data: arr});
                this.pageTabsValue = this.$route.fullPath
            }
        },
        created () {
            //pageTab
            this.$store.commit('PAGETABSLIST',{data: []});
            if(process.BROWSER_BUILD && this.pageTabsList.length == 0) {
                this.$store.commit('PAGETABSLIST',{data:[{name: 'CRM',fullPath: this.$route.fullPath}]});
                this.pageTabsValue = this.$route.fullPath
            }
            if (!process.BROWSER_BUILD) {
                return false;
            }
            if (sessionStorage.type) {
                if (sessionStorage.type!=1) {
                    this.type = false
                    document.getElementsByClassName("el-tabs__header")[0].style.padding='0'
                }
            }else {
                
            }
        },
        mounted() {
            // console.log(this.pageTabsList)
          
        }

    }
</script>

<style lang="scss">
    .default {
        height: 100%;
        min-height: 100%;
        overflow-y: auto;
        overflow-x:hidden;
        box-sizing: border-box;
        position: relative;
        padding: 50px 20px 80px 220px;
        .page-tabs{
            margin-top: 15px;
            // margin-left:50px
        }
        .el-tabs__content{
            display: none;
        }
        .el-tabs__header{
            padding-left: 95px
        }
        .my{
            margin-top:20px;
            color: #20a0ff;
            position: absolute;
            left: 245px;
            top:58px;
            z-index: 100;
            cursor:pointer;
            font-size:14px;
        }
        .my:hover{
        color: #20a0ff
        }
        .div{
            margin-bottom:50px
        }
    }
</style>